{extend name="admin/public/layout" /}
{block name="content"}
<template id="app">
    <div>
        <div class="btns">
            <a-button @click="init">
                <a-icon type="reload" />
            </a-button>
            <a-button v-if="multiple && selectedRowKeys.length > 0" type="primary" @click="handleSelect">选择</a-button>
            {:widget('after_btns')}
        </div>

        <a-table class="table" :columns="c_columns" :data-source="data"
            :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false"
            :loading="loading">
            <template slot="action" slot-scope="row">
                <a href="javascript:;" @click="handleSelectOne(row)">选择</a>
            </template>
        </a-table>
        <a-pagination v-if="pagination.total" v-model="pagination.current_page" :total="pagination.total"  :page-size="query.page_size" :show-total="function(total, range) {return '共 ' + total + ' 条记录';}"  @change="handlePageChange"></a-pagination>
        </a-pagination>
    </div>
</template>
{/block}
{block name="style"}
{:widget('style')}
{/block}
{block name="scripts"}
{:widget('scripts')}
{/block}